package com.polaris.live.adapter

import com.bumptech.glide.Glide
import com.polaris.live.common.adapter.BaseBindingAdapter
import com.polaris.live.common.adapter.VBViewHolder
import com.polaris.live.databinding.AdapterTogetherReceive2Binding
import com.polaris.live.resp.back_resp.UserConsumableRewardV2Resp
import com.polaris.live.utils.image.ImageUtils

/**
 * TogetherReceiveAdapter2
 *
 * @author Created by 天晴 on 2024/11/12/016 20:29
 */
class TogetherReceiveAdapter2 : BaseBindingAdapter<AdapterTogetherReceive2Binding, UserConsumableRewardV2Resp>() {

    override fun convert(holder: VBViewHolder<AdapterTogetherReceive2Binding>, item: UserConsumableRewardV2Resp) {
        holder.vb.apply {
            rewardName.text = item.displayText
            Glide.with(rewardImg.context).load(ImageUtils.imgPath(item.icon))
                .into(rewardImg)
            rewardCount.text = item.coin
        }
    }

}